package leetcode;

import java.util.Arrays;
import java.util.Comparator;

/**
 * @author Liangyaoyun
 */
public class leetCode191 {
    // you need to treat n as an unsigned value
    public int hammingWeight(int n) {
       int count =0;
        while (n != 0) {
            n &= n - 1;
            count++;
        }

        return count;
    }

    public static void main(String[] args) {
        int[][] nums=new int[][]{{1,4,3,2},{5,8,3,2},{2,6,1,4,5},{9,11,2,5,1,6,8,7}};

        for (int i = 0; i < nums.length; i++) {
            Arrays.sort(nums[i]);
        }
        System.out.println(Arrays.deepToString(nums));
    }
}





